<?php
include("../../share/config.php");
include("test.php");
include("book.php");
include("body.php");
$d = date("Y-m-d");
$td = date("d")+1;
$tm = date("Y-m-").$td;
for($i=1;$i<6;$i++){
echo 			'<h3 id="whichbuilding">
				教'.$i.'楼预约
			</h3>';
$cs = $i;
$sql="SELECT * from cr_info where building = '$cs'";
body($d,$tm,$i);
echo '<div class="tab-pane active" id="panel-'.$d.'-'.$i.'">';
body2($d);
$result=mysqli_query($conn,$sql);
while($row = mysqli_fetch_array($result,MYSQLI_ASSOC)){
	echo "<tr><td>".$row["cr_no"]."</td>";
	echo "<td><span class='label label-default'>".$row["cr_type"]."</span> <span class='label label-default'>".$row["cr_max"]."人</span></td>";
	echo "<td><div class='progress''>";
	showbar($row["cr_no"],$d,$cs);
	echo "</div><p align='center' id=".$d."-".$cs."-".$row["cr_no"].">悬浮于时间条看实际时间段</p></td>";
	echo '<td><a id="modal-'.$row["cr_no"].'" href="#modal-container-'.$row["cr_no"].'-'.$d.'-'.$i.'" role="button" class="btn" data-toggle="modal">点击预约</a>';
	booking($row["cr_no"],$d,$cs,$i);
	echo "</td></tr>";
}
echo "</tbody></table></div>";
echo '<div class="tab-pane" id="panel-'.$tm.'-'.$i.'">';
body2($tm);
$sql="SELECT * from cr_info where building = '$cs'";
$result=mysqli_query($conn,$sql);
while($row = mysqli_fetch_array($result,MYSQLI_ASSOC)){
	echo "<tr><td>".$row["cr_no"]."</td>";
	echo "<td><span class='label label-default'>".$row["cr_type"]."</span> <span class='label label-default'>".$row["cr_max"]."人</span></td>";
	echo "<td><div class='progress''>";
	showbar($row["cr_no"],$tm,$cs);
	echo "</div><p align='center' id=".$tm."-".$cs."-".$row["cr_no"].">悬浮于时间条看实际时间段</p></td>";
	echo '<td><a id="modal-'.$row["cr_no"].'" href="#modal-container-'.$row["cr_no"].'-'.$tm.'-'.$i.'" role="button" class="btn" data-toggle="modal">点击预约</a>';
	booking($row["cr_no"],$tm,$cs,$i);
	echo "</td></tr>";
}
echo "</tbody></table></div>";
echo "</div>";
}
?>
 